//
// Created by 李传智 on 2018/4/15.
//

#ifndef ANDSDK_IPLAYERPROXY_H
#define ANDSDK_IPLAYERPROXY_H


#include "IPlayer.h"
#include <mutex>

class IPlayerProxy : public IPlayer {

public:

    static IPlayerProxy *get();

    void init(void *vm);

    virtual bool setDataSource(const char *url);

    virtual void setPause(bool isPause);

    virtual double getCurrentPosition();

    virtual bool isPaused();

    virtual bool seek(double position);

    virtual void close();

    virtual bool start();

    virtual void setRender(void *window);

    virtual bool startRecord(const char *url);

    virtual bool stopRecord();

protected:

    IPlayerProxy() {}

    IPlayer *player = 0;

    std::mutex mutex;
};


#endif //ANDSDK_IPLAYERPROXY_H
